import request from '@/utils/request'

// 查询托盘列表
export function listTray(query) {
  return request({
    url: '/ground/tray/list',
    method: 'get',
    params: query
  })
}

// 查询托盘详情
export function getTray(flightNo) {
  return request({
    url: '/ground/tray/' + flightNo,
    method: 'get'
  })
}

// 修改托盘信息
export function updateTray(data) {
  return request({
    url: '/ground/tray/edit',
    method: 'put',
    data: data
  })
}

// 新增托盘
export function addTray(data) {
  return request({
    url: '/ground/tray/add',
    method: 'post',
    data: data
  })
}

// 删除托盘
export function delTray(trayId) {
  return request({
    url: '/ground/tray/' + trayId,
    method: 'delete'
  })
}

